3.1.98 \(\int \frac {(2+x) (d+e x)}{(4-5 x^2+x^4)^2} \, dx\)

Optimal. Leaf size=105 \[ -\frac {d-e}{36 (x+1)}+\frac {d+e}{12 (1-x)}+\frac {d+2 e}{36 (2-x)}+\frac {1}{36} (2 d+5 e) \log (1-x)-\frac {1}{432} (35 d+58 e) \log (2-x)+\frac {1}{108} (2 d+e) \log (x+1)+\frac {1}{144} (d-2 e) \log (x+2) \]

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {1586, 6742} \begin {gather*} -\frac {d-e}{36 (x+1)}+\frac {d+e}{12 (1-x)}+\frac {d+2 e}{36 (2-x)}+\frac {1}{36} (2 d+5 e) \log (1-x)-\frac {1}{432} (35 d+58 e) \log (2-x)+\frac {1}{108} (2 d+e) \log (x+1)+\frac {1}{144} (d-2 e) \log (x+2) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((2 + x)*(d + e*x))/(4 - 5*x^2 + x^4)^2,x]

[Out]

(d + e)/(12*(1 - x)) + (d + 2*e)/(36*(2 - x)) - (d - e)/(36*(1 + x)) + ((2*d + 5*e)*Log[1 - x])/36 - ((35*d +
58*e)*Log[2 - x])/432 + ((2*d + e)*Log[1 + x])/108 + ((d - 2*e)*Log[2 + x])/144

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {d+e x}{(2+x) \left (2-x-2 x^2+x^3\right )^2} \, dx\\ &=\int \left (\frac {d+2 e}{36 (-2+x)^2}+\frac {-35 d-58 e}{432 (-2+x)}+\frac {d+e}{12 (-1+x)^2}+\frac {2 d+5 e}{36 (-1+x)}+\frac {d-e}{36 (1+x)^2}+\frac {2 d+e}{108 (1+x)}+\frac {d-2 e}{144 (2+x)}\right ) \, dx\\ &=\frac {d+e}{12 (1-x)}+\frac {d+2 e}{36 (2-x)}-\frac {d-e}{36 (1+x)}+\frac {1}{36} (2 d+5 e) \log (1-x)-\frac {1}{432} (35 d+58 e) \log (2-x)+\frac {1}{108} (2 d+e) \log (1+x)+\frac {1}{144} (d-2 e) \log (2+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 97, normalized size = 0.92 \begin {gather*} \frac {1}{432} \left (\frac {12 \left (d \left (-5 x^2+6 x+5\right )+2 e \left (5-2 x^2\right )\right )}{x^3-2 x^2-x+2}+12 (2 d+5 e) \log (1-x)-(35 d+58 e) \log (2-x)+4 (2 d+e) \log (x+1)+3 (d-2 e) \log (x+2)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((2 + x)*(d + e*x))/(4 - 5*x^2 + x^4)^2,x]

[Out]

((12*(d*(5 + 6*x - 5*x^2) + 2*e*(5 - 2*x^2)))/(2 - x - 2*x^2 + x^3) + 12*(2*d + 5*e)*Log[1 - x] - (35*d + 58*e
)*Log[2 - x] + 4*(2*d + e)*Log[1 + x] + 3*(d - 2*e)*Log[2 + x])/432

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(2+x) (d+e x)}{\left (4-5 x^2+x^4\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((2 + x)*(d + e*x))/(4 - 5*x^2 + x^4)^2,x]

[Out]

IntegrateAlgebraic[((2 + x)*(d + e*x))/(4 - 5*x^2 + x^4)^2, x]

________________________________________________________________________________________

fricas [B]  time = 1.29, size = 211, normalized size = 2.01 \begin {gather*} -\frac {12 \, {\left (5 \, d + 4 \, e\right )} x^{2} - 72 \, d x - 3 \, {\left ({\left (d - 2 \, e\right )} x^{3} - 2 \, {\left (d - 2 \, e\right )} x^{2} - {\left (d - 2 \, e\right )} x + 2 \, d - 4 \, e\right )} \log \left (x + 2\right ) - 4 \, {\left ({\left (2 \, d + e\right )} x^{3} - 2 \, {\left (2 \, d + e\right )} x^{2} - {\left (2 \, d + e\right )} x + 4 \, d + 2 \, e\right )} \log \left (x + 1\right ) - 12 \, {\left ({\left (2 \, d + 5 \, e\right )} x^{3} - 2 \, {\left (2 \, d + 5 \, e\right )} x^{2} - {\left (2 \, d + 5 \, e\right )} x + 4 \, d + 10 \, e\right )} \log \left (x - 1\right ) + {\left ({\left (35 \, d + 58 \, e\right )} x^{3} - 2 \, {\left (35 \, d + 58 \, e\right )} x^{2} - {\left (35 \, d + 58 \, e\right )} x + 70 \, d + 116 \, e\right )} \log \left (x - 2\right ) - 60 \, d - 120 \, e}{432 \, {\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

-1/432*(12*(5*d + 4*e)*x^2 - 72*d*x - 3*((d - 2*e)*x^3 - 2*(d - 2*e)*x^2 - (d - 2*e)*x + 2*d - 4*e)*log(x + 2)
 - 4*((2*d + e)*x^3 - 2*(2*d + e)*x^2 - (2*d + e)*x + 4*d + 2*e)*log(x + 1) - 12*((2*d + 5*e)*x^3 - 2*(2*d + 5
*e)*x^2 - (2*d + 5*e)*x + 4*d + 10*e)*log(x - 1) + ((35*d + 58*e)*x^3 - 2*(35*d + 58*e)*x^2 - (35*d + 58*e)*x
+ 70*d + 116*e)*log(x - 2) - 60*d - 120*e)/(x^3 - 2*x^2 - x + 2)

________________________________________________________________________________________

giac [A]  time = 0.31, size = 98, normalized size = 0.93 \begin {gather*} \frac {1}{144} \, {\left (d - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{108} \, {\left (2 \, d + e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{36} \, {\left (2 \, d + 5 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{432} \, {\left (35 \, d + 58 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {{\left (5 \, d + 4 \, e\right )} x^{2} - 6 \, d x - 5 \, d - 10 \, e}{36 \, {\left (x + 1\right )} {\left (x - 1\right )} {\left (x - 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

1/144*(d - 2*e)*log(abs(x + 2)) + 1/108*(2*d + e)*log(abs(x + 1)) + 1/36*(2*d + 5*e)*log(abs(x - 1)) - 1/432*(
35*d + 58*e)*log(abs(x - 2)) - 1/36*((5*d + 4*e)*x^2 - 6*d*x - 5*d - 10*e)/((x + 1)*(x - 1)*(x - 2))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 106, normalized size = 1.01 \begin {gather*} \frac {d \ln \left (x +2\right )}{144}-\frac {35 d \ln \left (x -2\right )}{432}+\frac {d \ln \left (x -1\right )}{18}+\frac {d \ln \left (x +1\right )}{54}-\frac {e \ln \left (x +2\right )}{72}-\frac {29 e \ln \left (x -2\right )}{216}+\frac {5 e \ln \left (x -1\right )}{36}+\frac {e \ln \left (x +1\right )}{108}-\frac {d}{36 \left (x -2\right )}-\frac {d}{36 \left (x +1\right )}-\frac {d}{12 \left (x -1\right )}-\frac {e}{18 \left (x -2\right )}+\frac {e}{36 x +36}-\frac {e}{12 \left (x -1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+2)*(e*x+d)/(x^4-5*x^2+4)^2,x)

[Out]

-35/432*d*ln(x-2)-29/216*e*ln(x-2)-1/36/(x-2)*d-1/18/(x-2)*e-1/36/(x+1)*d+1/36/(x+1)*e+1/54*d*ln(x+1)+1/108*e*
ln(x+1)-1/12/(x-1)*d-1/12/(x-1)*e+1/18*d*ln(x-1)+5/36*e*ln(x-1)+1/144*d*ln(x+2)-1/72*e*ln(x+2)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 88, normalized size = 0.84 \begin {gather*} \frac {1}{144} \, {\left (d - 2 \, e\right )} \log \left (x + 2\right ) + \frac {1}{108} \, {\left (2 \, d + e\right )} \log \left (x + 1\right ) + \frac {1}{36} \, {\left (2 \, d + 5 \, e\right )} \log \left (x - 1\right ) - \frac {1}{432} \, {\left (35 \, d + 58 \, e\right )} \log \left (x - 2\right ) - \frac {{\left (5 \, d + 4 \, e\right )} x^{2} - 6 \, d x - 5 \, d - 10 \, e}{36 \, {\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

1/144*(d - 2*e)*log(x + 2) + 1/108*(2*d + e)*log(x + 1) + 1/36*(2*d + 5*e)*log(x - 1) - 1/432*(35*d + 58*e)*lo
g(x - 2) - 1/36*((5*d + 4*e)*x^2 - 6*d*x - 5*d - 10*e)/(x^3 - 2*x^2 - x + 2)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 90, normalized size = 0.86 \begin {gather*} \ln \left (x-1\right )\,\left (\frac {d}{18}+\frac {5\,e}{36}\right )-\frac {\left (-\frac {5\,d}{36}-\frac {e}{9}\right )\,x^2+\frac {d\,x}{6}+\frac {5\,d}{36}+\frac {5\,e}{18}}{-x^3+2\,x^2+x-2}+\ln \left (x+1\right )\,\left (\frac {d}{54}+\frac {e}{108}\right )+\ln \left (x+2\right )\,\left (\frac {d}{144}-\frac {e}{72}\right )-\ln \left (x-2\right )\,\left (\frac {35\,d}{432}+\frac {29\,e}{216}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x + 2)*(d + e*x))/(x^4 - 5*x^2 + 4)^2,x)

[Out]

log(x - 1)*(d/18 + (5*e)/36) - ((5*d)/36 + (5*e)/18 - x^2*((5*d)/36 + e/9) + (d*x)/6)/(x + 2*x^2 - x^3 - 2) +
log(x + 1)*(d/54 + e/108) + log(x + 2)*(d/144 - e/72) - log(x - 2)*((35*d)/432 + (29*e)/216)

________________________________________________________________________________________

sympy [B]  time = 8.79, size = 1034, normalized size = 9.85

result too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)*(e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

(d - 2*e)*log(x + (8710660*d**5 + 91884504*d**4*e - 7579779*d**4*(d - 2*e)/4 + 364910432*d**3*e**2 - 18128055*
d**3*e*(d - 2*e) - 83772*d**3*(d - 2*e)**2 + 686697536*d**2*e**3 - 60296868*d**2*e**2*(d - 2*e) - 597816*d**2*
e*(d - 2*e)**2 + 65907*d**2*(d - 2*e)**3/4 + 614357568*d*e**4 - 85949220*d*e**3*(d - 2*e) - 1500048*d*e**2*(d
- 2*e)**2 + 105840*d*e*(d - 2*e)**3 + 208470400*e**5 - 45136356*e**4*(d - 2*e) - 1196064*e**3*(d - 2*e)**2 + 1
28277*e**2*(d - 2*e)**3)/(3374210*d**5 + 38645295*d**4*e + 170558380*d**3*e**2 + 362061760*d**2*e**3 + 3702981
60*d*e**4 + 146466320*e**5))/144 + (2*d + e)*log(x + (8710660*d**5 + 91884504*d**4*e - 2526593*d**4*(2*d + e)
+ 364910432*d**3*e**2 - 24170740*d**3*e*(2*d + e) - 148928*d**3*(2*d + e)**2 + 686697536*d**2*e**3 - 80395824*
d**2*e**2*(2*d + e) - 1062784*d**2*e*(2*d + e)**2 + 39056*d**2*(2*d + e)**3 + 614357568*d*e**4 - 114598960*d*e
**3*(2*d + e) - 2666752*d*e**2*(2*d + e)**2 + 250880*d*e*(2*d + e)**3 + 208470400*e**5 - 60181808*e**4*(2*d +
e) - 2126336*e**3*(2*d + e)**2 + 304064*e**2*(2*d + e)**3)/(3374210*d**5 + 38645295*d**4*e + 170558380*d**3*e*
*2 + 362061760*d**2*e**3 + 370298160*d*e**4 + 146466320*e**5))/108 + (2*d + 5*e)*log(x + (8710660*d**5 + 91884
504*d**4*e - 7579779*d**4*(2*d + 5*e) + 364910432*d**3*e**2 - 72512220*d**3*e*(2*d + 5*e) - 1340352*d**3*(2*d
+ 5*e)**2 + 686697536*d**2*e**3 - 241187472*d**2*e**2*(2*d + 5*e) - 9565056*d**2*e*(2*d + 5*e)**2 + 1054512*d*
*2*(2*d + 5*e)**3 + 614357568*d*e**4 - 343796880*d*e**3*(2*d + 5*e) - 24000768*d*e**2*(2*d + 5*e)**2 + 6773760
*d*e*(2*d + 5*e)**3 + 208470400*e**5 - 180545424*e**4*(2*d + 5*e) - 19137024*e**3*(2*d + 5*e)**2 + 8209728*e**
2*(2*d + 5*e)**3)/(3374210*d**5 + 38645295*d**4*e + 170558380*d**3*e**2 + 362061760*d**2*e**3 + 370298160*d*e*
*4 + 146466320*e**5))/36 - (35*d + 58*e)*log(x + (8710660*d**5 + 91884504*d**4*e + 2526593*d**4*(35*d + 58*e)/
4 + 364910432*d**3*e**2 + 6042685*d**3*e*(35*d + 58*e) - 9308*d**3*(35*d + 58*e)**2 + 686697536*d**2*e**3 + 20
098956*d**2*e**2*(35*d + 58*e) - 66424*d**2*e*(35*d + 58*e)**2 - 2441*d**2*(35*d + 58*e)**3/4 + 614357568*d*e*
*4 + 28649740*d*e**3*(35*d + 58*e) - 166672*d*e**2*(35*d + 58*e)**2 - 3920*d*e*(35*d + 58*e)**3 + 208470400*e*
*5 + 15045452*e**4*(35*d + 58*e) - 132896*e**3*(35*d + 58*e)**2 - 4751*e**2*(35*d + 58*e)**3)/(3374210*d**5 +
38645295*d**4*e + 170558380*d**3*e**2 + 362061760*d**2*e**3 + 370298160*d*e**4 + 146466320*e**5))/432 + (6*d*x
 + 5*d + 10*e + x**2*(-5*d - 4*e))/(36*x**3 - 72*x**2 - 36*x + 72)

________________________________________________________________________________________